package com.germinus.telcoblocks.echarts.Click2Dial;

/**
 * Class representing a request to set up a call between two specified parties.
 *
 */
public class Click2DialEChartsBean {

	static final String rcsid="$Name:  $ $Id: MyClick2Dial.java,v 1.2 2007/12/12 20:18:40 cheung Exp $";

	private String party1 = null;
	private String party2 = null;
	private int timeoutSec = -1;
	private boolean earlyMediaReinvite = true;
	private String uid = null;
	
	/**
	 * @return first party address (SIP URI)
	 */
	public String getParty1() {
		return party1;
	}

	/** Sets the address of the desired first party (String representation of SIP URI)
	 * @param party1 SIP URI
	 */
	public void setParty1(final String party1) {
		this.party1 = party1;
	}

	/**
	 * @return second party address (SIP URI)
	 */
	public String getParty2() {
		return party2;
	}

	/** Sets the address of the desired second party (String representation of SIP URI)
	 * @param party2 SIP URI
	 */
	public void setParty2(final String party2) {
		this.party2 = party2;
	}

	/**
	 * @return timeout value for first party to answer in seconds
	 */
	public int getTimeoutSec() {
		return timeoutSec;
	}

	/** Sets an optional timeout in seconds for first party to answer.
	 * If no answer in the specified number of seconds, then the call
	 * will abort.  Default: -1 (no timeout)
	 * @param timeoutSec timeout value in seconds (-1 for no timeout)
	 */
	public void setTimeoutSec(int timeoutSec) {
		this.timeoutSec = timeoutSec;
	}

	/**
	 * @return current setting of earlyMediaReinvite
	 */
	public boolean getEarlyMediaReinvite() {
		return earlyMediaReinvite;
	}

	/** Specifies whether or not the first party should receive a re-INVITE if the
	 * party returns an early media response.  Default: true.
	 * @param earlyMediaReinvite
	 */
	public void setEarlyMediaReinvite(final boolean earlyMediaReinvite) {
		this.earlyMediaReinvite = earlyMediaReinvite;
	}

	/** Set value of X-ECHARTS-UID header in INVITE to first
		party. Default: null.
		@param uid X-ECHARTS-UID header value - should be unique
	*/
	public void setUid(final String uid) {
		this.uid = uid;
	}

	/** 
		@return value of uid
	*/
	public String getUid() {
		return uid;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return "party1 = " + party1 + "\n" + 
			"party2 = " + party2 + "\n" +
			"timeoutSec = " + timeoutSec + "\n" +
			"earlyMediaReinvite = " + earlyMediaReinvite + "\n" + 
			"uid = " + uid + "\n";		
	}

}
